﻿<%@ Page Language="C#" MasterPageFile="~/web/pages/NhaTuyenDung.master" AutoEventWireup="true"
    CodeFile="nhatuyendung_timkiem.aspx.cs" Inherits="web_pages_nhatuyendung_timkiem"
    Title="Tim kiem ung vien" %>

<%@ Register Assembly="RadInput.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="vl_left_news_main_tt">
        Tìm Kiếm Ứng Viên
    </div>
    <div>
        <div style="width: 99%; float: left; padding: 1px" class="ui-widget ui-widget-content ui-corner-all ">
            <div style="height: 20px; padding-top: 5px; padding-left: 20px;" class="ui-widget-header ui-corner-all ">
                Tiêu Chí Tìm kiếm
            </div>
            <div class="ui-widget ui-widget-content ui-corner-all" style="padding: 3px; text-align: right;">
                <table width="100%">
                    <tr>
                        <td align="left" style="border-bottom: #ccc 1px dotted">
                            <asp:CheckBox ID="chk_nganh" runat="server"/></td>
                        <td style="border-bottom: #ccc 1px dotted; width: 65px;" align="left">
                            Ngành Nghề
                        </td>
                        <td align="left" colspan="3" style="border-bottom: #ccc 1px dotted">
                            <asp:DropDownList ID="cbb_nganh_nghe" runat="server" Width="225px">
                            </asp:DropDownList>
                            Học vấn
                            <asp:DropDownList ID="cbb_hoc_van" runat="server" Width="105px">
                            </asp:DropDownList>
                            Kinh Nghiệm (tháng)
                            <rad:RadNumericTextBox ID="txt_kinh_nghiem" runat="server" CausesValidation="True"
                                MinValue="0" Width="39px">
                                <NumberFormat AllowRounding="True" DecimalDigits="0"></NumberFormat>
                            </rad:RadNumericTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" style="border-bottom: #ccc 1px dotted">
                            <asp:CheckBox ID="chk_nguoi" runat="server" /></td>
                        <td style="border-bottom: #ccc 1px dotted; width: 65px;" align="left">
                            Giới Tính</td>
                        <td align="left" colspan="3" style="border-bottom: #ccc 1px dotted">
                            <asp:CheckBox ID="chk_nam" runat="server" Text="Nam" />
                            <asp:CheckBox ID="chk_nu" runat="server" Text="Nữ" />. Tuổi&nbsp;
                            <rad:RadNumericTextBox ID="txt_tuoi_tu" runat="server" CausesValidation="True" MinValue="0"
                                Width="28px" Value="18">
                                <NumberFormat AllowRounding="True" DecimalDigits="0" />
                            </rad:RadNumericTextBox>
                            đến &nbsp;
                            <rad:RadNumericTextBox ID="txt_tuoi_den" runat="server" CausesValidation="True" MinValue="0"
                                Width="28px" Value="45">
                                <NumberFormat AllowRounding="True" DecimalDigits="0" />
                            </rad:RadNumericTextBox>. Chiều cao&nbsp;
                            <rad:RadNumericTextBox ID="txt_cao_tu" runat="server" CausesValidation="True" MinValue="0"
                                Width="28px" Value="150">
                                <NumberFormat AllowRounding="True" DecimalDigits="0" />
                            </rad:RadNumericTextBox>
                            đến
                            <rad:RadNumericTextBox ID="txt_cao_den" runat="server" CausesValidation="True" MinValue="0"
                                Width="28px" Value="200">
                                <NumberFormat AllowRounding="True" DecimalDigits="0" />
                            </rad:RadNumericTextBox></td>
                    </tr>
                    <tr>
                        <td align="left" style="border-bottom: #ccc 1px dotted">
                            <asp:CheckBox ID="chk_chuc_danh" runat="server" /></td>
                        <td style="border-bottom: #ccc 1px dotted; width: 65px;" align="left">
                            Chức Danh</td>
                        <td align="left" style="border-bottom: #ccc 1px dotted">
                            &nbsp;<input id="txt_chuc_danh" size="" style="float: left; width: 200px" type="text" />
                            <span class="ui-icon ui-icon-circle-zoomin" onclick="loadChucDanh('NULL')" style="float:left; cursor: pointer">
                            </span>
                            <asp:HiddenField ID="txt_chuc_danh_hidden" runat="server" />
                        </td>
                        <td style="border-bottom: #ccc 1px dotted; width: 123px;" align="left">
                            <asp:CheckBox ID="chk_thoi_gian" runat="server" />Thời gian làm việc</td>
                        <td align="left" style="border-bottom: #ccc 1px dotted">
                            <asp:DropDownList ID="cbb_thoi_gian_lam_viec" runat="server" Width="200px">
                            </asp:DropDownList></td>
                    </tr>
                    <tr>
                        <td align="left" style="border-bottom: #ccc 1px dotted">
                            <asp:CheckBox ID="chk_hokhau" runat="server" /></td>
                        <td style="border-bottom: #ccc 1px dotted; width: 65px;" align="left">
                            Hộ Khẩu</td>
                        <td align="left" style="border-bottom: #ccc 1px dotted">
                            <asp:DropDownList ID="cbb_ho_khau" runat="server" Width="150px" Style="float: left;">
                            </asp:DropDownList>
                            <a href="javascript:void(0);" onclick="addItem('list_ho_khau',$('#ctl00_ContentPlaceHolder1_cbb_ho_khau :selected').val(),$('#ctl00_ContentPlaceHolder1_cbb_ho_khau :selected').text())" style="float: left;"><span class="ui-icon ui-icon-circle-plus">
                            </span></a><a href="javascript:void(0);" onclick="removeItems('list_ho_khau');" style="float: left;"><span class="ui-icon  ui-icon-circle-minus">
                            </span></a>
                            <br />
                            <select id="list_ho_khau" multiple="multiple" size="4" style="float: left; width: 210px;
                                margin-right: 4px">
                            </select>
                            &nbsp;&nbsp;<asp:HiddenField ID="txt_list_hokhau_hidden" runat="server" />
                        </td>
                        <td style="border-bottom: #ccc 1px dotted; width: 123px;" align="left">
                            <asp:CheckBox ID="chk_noilamviec" runat="server" />Nơi Làm Việc</td>
                        <td align="left" style="border-bottom: #ccc 1px dotted">
                            <asp:DropDownList ID="cbb_noi_lam_viec" runat="server" Width="150px" Style="float: left;">
                            </asp:DropDownList>
                            <a href="javascript:void(0);"  onclick="addItem('list_noi_lam_viec',$('#ctl00_ContentPlaceHolder1_cbb_noi_lam_viec :selected').val(),$('#ctl00_ContentPlaceHolder1_cbb_noi_lam_viec :selected').text())" id="A1" style="float: left;"><span class="ui-icon ui-icon-circle-plus">
                            </span></a><a href="javascript:void(0);" onclick="removeItems('list_noi_lam_viec');" id="A2" style="float: left;"><span class="ui-icon  ui-icon-circle-minus">
                            </span></a>
                            <br />
                            <select id="list_noi_lam_viec" multiple="multiple" size="4" style="float: left; width: 210px;
                                margin-right: 4px">
                            </select>
                            <asp:HiddenField ID="txt_list_noilamviec_hidden" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td align="left" style="border-bottom: #ccc 1px dotted">
                            <asp:CheckBox ID="chk_kha_nang_mem" runat="server" /></td>
                        <td style="border-bottom: #ccc 1px dotted; width: 65px;" align="left">
                            Khả năng mềm</td>
                        <td align="left" style="border-bottom: #ccc 1px dotted">
                            <asp:DropDownList ID="cbb_kn_mem" runat="server" Width="150px" Style="float: left;">
                            </asp:DropDownList>
                            <a href="javascript:void(0);"  onclick="addItem('list_kha_nang_mem',$('#ctl00_ContentPlaceHolder1_cbb_kn_mem :selected').val(),$('#ctl00_ContentPlaceHolder1_cbb_kn_mem :selected').text())" id="A3" style="float: left;"><span class="ui-icon ui-icon-circle-plus">
                            </span></a><a href="javascript:void(0);" onclick="removeItems('list_kha_nang_mem');" id="A4" style="float: left;"><span class="ui-icon  ui-icon-circle-minus">
                            </span></a>
                            <br />
                            <select id="list_kha_nang_mem" multiple="multiple" size="4" style="float: left; width: 210px;
                                margin-right: 4px">
                            </select>
                            <asp:HiddenField ID="cbb_list_ky_nang_mem_hidden" runat="server" />
                        </td>
                        <td style="border-bottom: #ccc 1px dotted; width: 123px;" align="left">
                            <asp:CheckBox ID="chk_nghiep_vu" runat="server" />Nghiệp Vụ</td>
                        <td align="left" style="border-bottom: #ccc 1px dotted">
                            <a href="javascript:void(0);" onclick="loadNghiepVu();" style="float: left;"><span class="ui-icon ui-icon-circle-plus"></span></a><a href="javascript:void(0);" onclick="removeItems('list_nghiep_vu');" style="float: left;"><span class="ui-icon  ui-icon-circle-minus"></span></a> <br style="clear:both;" />
                            <select id="list_nghiep_vu" multiple="multiple" size="4" style="float: left; width: 210px;
                                margin-right: 4px">
                            </select>
                            <asp:HiddenField ID="txt_list_nghiepvu_hidden" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td align="left" style="border-bottom: #ccc 1px dotted">
                            <asp:CheckBox ID="chk_ten" runat="server" /></td>
                        <td style="border-bottom: #ccc 1px dotted; width: 65px;" align="left">
                            Theo tên</td>
                        <td align="left" style="border-bottom: #ccc 1px dotted">
                            <asp:TextBox ID="txt_ten" runat="server" Width="190px"></asp:TextBox></td>
                        <td style="border-bottom: #ccc 1px dotted; width: 123px;" align="left">
                            <asp:CheckBox ID="chk_mota" runat="server" />Thông tin khác</td>
                        <td align="left" style="border-bottom: #ccc 1px dotted">
                            <asp:TextBox ID="txt_mo_ta" runat="server" Width="190px"></asp:TextBox></td>
                    </tr>
                </table>
                <asp:Button ID="btn_tim_kiem" runat="server" Text="Tìm Kiếm" CssClass=" ui-state-default ui-corner-all"
                    OnClick="btn_tim_kiem_Click" OnClientClick="LoadTuyenDungBeforeSubmit();" /></div>
        </div>
        <div style="width: 99%; float: left; padding: 1px; margin-top: 10px;" class="ui-widget ui-widget-content ui-corner-all ">
            <div style="height: 20px; padding-top: 5px; padding-left: 20px;" class="ui-widget-header ui-corner-all ">
                Kết Quả Tìm Kiếm : <span style="color: red"><%=rpt_result.Items.Count %> </span>kết quả phù hợp.
            </div>
            <div class="ui-widget ui-widget-content ui-corner-all" style="padding: 3px;">
            <table class="atable" style="width:99.5%; text-align: left;" >
                        <thead>
                            <tr>
                                <th style="width: 40%; height: 20px;">
                                   Người tìm việc / Hồ sơ </th>
                               
                                <th style="width: 20%; height: 20px;">
                                    Chức Danh mong muốn </th>
                                <th style="width: 20%; height: 20px;">
                                   Xem chi tiết  </th>
                            </tr>
                        </thead>
                        <asp:Repeater ID="rpt_result" runat="server">
                            <ItemTemplate>
                             <tr>
                                <td>
                                <b> <%#DataBinder.Eval(Container.DataItem, "ho_ten")%></b> (NS:<%#DataBinder.Eval(Container.DataItem, "ngay_sinh")%>  )<br />
                                    <%#DataBinder.Eval(Container.DataItem, "tieu_de")%> .
                                </td>
                                 <td>
                                    <%#DataBinder.Eval(Container.DataItem, "ten_chuc_danh")%>
                                </td>
                                <td>
                                   <a href="../../Default.aspx?page=ntv_chitiet&id=<%#DataBinder.Eval(Container.DataItem, "ma_ho_so")%>" > [Xem thông tin] </a>
                                </td>
                            </tr>
                            </ItemTemplate>                            
                        </asp:Repeater>
                </table>
            </div>
        </div>
    </div>
    <div id="dialog_chucdanh" class="ui-dialog-content ui-widget-content" style="height: auto;
        min-height: 61px; max-height: 400px; overflow: auto; overflow-x: none; width: auto;
        text-align: left;">
    </div>
    <div id="dialog_nghiepvu" class="ui-dialog-content ui-widget-content" style="height: auto;
        min-height: 41px; width: auto; text-align: left;">
    </div>

    <script type="text/javascript">
        function LoadTuyenDungBeforeSubmit(){
            var _value = "";
            var _text = "";
               var optionsSel;
             // list_noi_lam_viec
               optionsSel = document.getElementById('list_noi_lam_viec');
	            for (var i = 0; i < optionsSel.length; i++) {
                 _value = _value + optionsSel.options[i].value + '#';
	            }
            $('#ctl00_ContentPlaceHolder1_txt_list_noilamviec_hidden').val(_value);
            
             // ho khau
             _value = "";
            optionsSel = document.getElementById('list_ho_khau');
	            for (var i = 0; i < optionsSel.length; i++) {
                 _value = _value + optionsSel.options[i].value + '#';
	            }
             $('#ctl00_ContentPlaceHolder1_txt_list_hokhau_hidden').val(_value);
             
             // nghiep vu
             _value = "";
            optionsSel = document.getElementById('list_nghiep_vu');
	            for (var i = 0; i < optionsSel.length; i++) {
                 _value = _value + optionsSel.options[i].value + '@';
	            }
             $('#ctl00_ContentPlaceHolder1_txt_list_nghiepvu_hidden').val(_value);
            // ky năng mềm
             _value = "";
            optionsSel = document.getElementById('list_kha_nang_mem');
	            for (var i = 0; i < optionsSel.length; i++) {
                 _value = _value + optionsSel.options[i].value + '#';
	            }
             $('#ctl00_ContentPlaceHolder1_cbb_list_ky_nang_mem_hidden').val(_value);
             }
    </script>

</asp:Content>
